#pragma warning disable 0618
using System;
using System.Collections.Generic;
using Table.DataModel;
namespace Table.Dao
{
    public class TableEquipBasePropDao:DaoBase<TableEquipBaseProp>
    {
        public override string GetFileName()
        {
            return "TableEquipBaseProp.csv";
        }
        public override void BuildIndex()
        {
            if (cacheList != null)
            {
                cachePrimaryInt = new Dictionary<int, TableEquipBaseProp>(cacheList.Count);
            }
            base.BuildIndex();
        }
        public override void AddPrimaryIndex(TableEquipBaseProp model)
        {
            #if UNITY_EDITOR
            if(cachePrimaryInt.ContainsKey(model.propId)) UnityEngine.Debug.LogError("数据表id重复:TableEquipBaseProp->id: " + model.propId);
            #endif
            cachePrimaryInt[model.propId] = model;
        }
        protected override TableEquipBaseProp ParseRowData(string[] rowData)
        {
            TableEquipBaseProp data = new TableEquipBaseProp();
            if (!string.IsNullOrEmpty(rowData[0]))
            {
                data.propId = int.Parse(rowData[0]);
            }
            if (!string.IsNullOrEmpty(rowData[1]))
            {
                data.propType = int.Parse(rowData[1]);
            }
            if (!string.IsNullOrEmpty(rowData[2]))
            {
                data.columnNum = int.Parse(rowData[2]);
            }
            if (!string.IsNullOrEmpty(rowData[3]))
            {
                data.valueZone1 = string.Intern(rowData[3]);
            }
            if (!string.IsNullOrEmpty(rowData[4]))
            {
                data.valueZone2 = string.Intern(rowData[4]);
            }
            if (!string.IsNullOrEmpty(rowData[5]))
            {
                data.valueZone3 = string.Intern(rowData[5]);
            }
            if (!string.IsNullOrEmpty(rowData[6]))
            {
                data.valueZone4 = string.Intern(rowData[6]);
            }
            if (!string.IsNullOrEmpty(rowData[7]))
            {
                data.valueZone5 = string.Intern(rowData[7]);
            }
            if (!string.IsNullOrEmpty(rowData[8]))
            {
                data.valueZone6 = string.Intern(rowData[8]);
            }
            if (!string.IsNullOrEmpty(rowData[9]))
            {
                data.valueZone7 = rowData[9];
            }
            if (!string.IsNullOrEmpty(rowData[10]))
            {
                data.valueZone8 = rowData[10];
            }
            if (!string.IsNullOrEmpty(rowData[11]))
            {
                data.valueZone9 = rowData[11];
            }
            if (!string.IsNullOrEmpty(rowData[12]))
            {
                data.valueZone10 = rowData[12];
            }
            if (!string.IsNullOrEmpty(rowData[13]))
            {
                data.authTimes1 = int.Parse(rowData[13]);
            }
            if (!string.IsNullOrEmpty(rowData[14]))
            {
                data.authTimes2 = int.Parse(rowData[14]);
            }
            if (!string.IsNullOrEmpty(rowData[15]))
            {
                data.authTimes3 = int.Parse(rowData[15]);
            }
            if (!string.IsNullOrEmpty(rowData[16]))
            {
                data.authTimes4 = int.Parse(rowData[16]);
            }
            if (!string.IsNullOrEmpty(rowData[17]))
            {
                data.authTimes5 = int.Parse(rowData[17]);
            }
            if (!string.IsNullOrEmpty(rowData[18]))
            {
                data.authTimes6 = int.Parse(rowData[18]);
            }
            if (!string.IsNullOrEmpty(rowData[19]))
            {
                data.authTimes7 = int.Parse(rowData[19]);
            }
            if (!string.IsNullOrEmpty(rowData[20]))
            {
                data.authTimes8 = int.Parse(rowData[20]);
            }
            if (!string.IsNullOrEmpty(rowData[21]))
            {
                data.authTimes9 = int.Parse(rowData[21]);
            }
            if (!string.IsNullOrEmpty(rowData[22]))
            {
                data.authTimes10 = int.Parse(rowData[22]);
            }
            if (!string.IsNullOrEmpty(rowData[23]))
            {
                data.weight1 = int.Parse(rowData[23]);
            }
            if (!string.IsNullOrEmpty(rowData[24]))
            {
                data.weight2 = int.Parse(rowData[24]);
            }
            if (!string.IsNullOrEmpty(rowData[25]))
            {
                data.weight3 = int.Parse(rowData[25]);
            }
            if (!string.IsNullOrEmpty(rowData[26]))
            {
                data.weight4 = int.Parse(rowData[26]);
            }
            if (!string.IsNullOrEmpty(rowData[27]))
            {
                data.weight5 = int.Parse(rowData[27]);
            }
            if (!string.IsNullOrEmpty(rowData[28]))
            {
                data.weight6 = int.Parse(rowData[28]);
            }
            if (!string.IsNullOrEmpty(rowData[29]))
            {
                data.weight7 = int.Parse(rowData[29]);
            }
            if (!string.IsNullOrEmpty(rowData[30]))
            {
                data.weight8 = int.Parse(rowData[30]);
            }
            if (!string.IsNullOrEmpty(rowData[31]))
            {
                data.weight9 = int.Parse(rowData[31]);
            }
            if (!string.IsNullOrEmpty(rowData[32]))
            {
                data.weight10 = int.Parse(rowData[32]);
            }
            if (!string.IsNullOrEmpty(rowData[33]))
            {
                data.baseScore = int.Parse(rowData[33]);
            }
            if (!string.IsNullOrEmpty(rowData[34]))
            {
                data.randScore = int.Parse(rowData[34]);
            }
            return data;
        }
    }
}
